import React, {Component} from 'react';
import {ScrollView, View} from 'react-native';
import BottonBar from '../components/TabBar/index';
import styles from './style';

import {Home} from '../pages/Home';
import {Tools} from '../pages/Tools';
import {createStackNavigator} from '@react-navigation/stack';

const Stack = createStackNavigator();
export class TabBarLayout extends Component {
  render() {
    return (
      <View style={styles.container}>
        <View style={styles.view}>
          <ScrollView
            automaticallyAdjustContentInsets={false}
            showsHorizontalScrollIndicator={false}
            showsVerticalScrollIndicator={false}>
            <Stack.Navigator initialRouteName="Index/Home">
              <Stack.Screen name="Index/Home" component={Home} />
              <Stack.Screen name="Index/Tools" component={Tools} />
            </Stack.Navigator>
          </ScrollView>
        </View>
        <View style={styles.tabbar}>
          <BottonBar />
        </View>
      </View>
    );
  }
}
